
var getOffset = function(args) {
	var x0 = args.x0;
	var y0 = args.y0;
	var r = args.r;
	var a = args.angle;
	var offset = [];
	offset[0] = x0 + r * Math.cos(a);
	offset[1] = y0 + r * Math.sin(a);
	return offset;
};
window.angle = 0;
window.setInterval(function() {
	var offset = getOffset({x0: 300, y0: 300, r: 50, angle: window.angle});
	var offset2 = getOffset({x0: 300, y0: 300, r: 100, angle: window.angle});
	window.angle += 0.05;
	$("#circle").css({left: offset[0], top: offset[1]});
	$("#circle2").css({left: offset2[0], top: offset2[1]});
}, 1);